-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New telepresence replace command. #3764
base: release/v2
Are you sure you want to change the base?
Conversation
Still a draft. Integration and docs are in the works. |
1d01171
to
002afbe
Compare
002afbe
to
b31a69e
Compare
b31a69e
to
e816443
Compare
e816443
to
681a5a0
Compare
681a5a0
to
b4c333f
Compare
074f21b
to
d0d27c8
Compare
d0d27c8
to
215d7ff
Compare
215d7ff
to
198d06a
Compare
Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Introducing `telepresence replace` as an alternative to the `intercept` resulted in a lot of documentation changes. For many (most) use-cases, a `replace` is more natural than an `intercept` unless there's an ability to do personal intercepts, and the OSS edition doesn't provide that. Signed-off-by: Thomas Hallgren <[email protected]>
1ab6cf4
to
311de3e
Compare
Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Most of the panic recovery routines were added to ensure logging the stack-trace of the panic. Containers in pods seem to run with `GOTRACEBACK=""` which apparently overrides the default "single" setting. To mitigate this, the traffic-manager, traffic-agent, and agent-init containers now use the `debug.SetTraceback("single")` Signed-off-by: Thomas Hallgren <[email protected]>
ee12df7
to
59fb3f7
Compare
Signed-off-by: Thomas Hallgren <[email protected]>
docs/reference/intercepts/cli.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how the hosted documentation URLs are built, but if they are inferred from the directory structure, we could rename the intercepts
directory here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still have panic recovery in we still have serveMutatingFunc
- didn't you intend to remove it in 59fb3f7#diff-e6df1931e03199997ae8c5c0ec6325293de7862dd39912c2995d2099cfa06032?
pkg/client/cli/cmd/genyaml.go
Outdated
} | ||
flags := cmd.Flags() | ||
flags.StringVarP(&info.workloadName, "workload", "w", "", | ||
"Name of the workload. If given, the configmap entry will be retrieved telepresence-agents configmap, mutually exclusive to --config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Name of the workload. If given, the configmap entry will be retrieved telepresence-agents configmap, mutually exclusive to --config") | |
"Name of the workload. If given, the configmap entry will be retrieved from the telepresence-agents configmap, mutually exclusive to --config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like the removal of tp agents configmap
integration_test/workloads_test.go
Outdated
@@ -24,6 +24,7 @@ func (s *connectedSuite) successfulIntercept(tp, wl, port string) { | |||
2*time.Second, // polling interval | |||
) | |||
|
|||
itest.TelepresenceOk(ctx, "loglevel", "trace") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to restore to the previous state
itest.TelepresenceOk(ctx, "loglevel", "trace") | |
itest.TelepresenceOk(ctx, "loglevel", "trace") | |
defer itest.TelepresenceOk(ctx, "loglevel", "debug") |
Signed-off-by: Thomas Hallgren <[email protected]>
- Remove panic recovery in mutator/service.go - Remove extraneous loglevel setting in succesfulIntercept itest - Remove unused `--workload` flag from some genyaml commands. Signed-off-by: Thomas Hallgren <[email protected]>
028c18b
to
b1fe5a6
Compare
The new
telepresence replace
command simplifies and clarifies container replacement.Previously, the
--replace
flag within thetelepresence intercept
command was used to replace containers. However, this approach introduced inconsistencies and limitations:To address these issues, the
--replace
flag withintelepresence intercept
has been deprecated. The newtelepresence replace
command provides a dedicated and consistent method for replacing containers, enhancing clarity and reliability.Key differences between
replace
andintercept
:replace
command targets and affects an entire container, impacting all its traffic, while anintercept
targets specific services and/or service/container ports.--port
flag are container ports.replace
can occur without intercepting any ports.replace
, the original container is no longer active within the cluster.The deprecated
--replace
flag still works, but is hidden from thetelepresence intercept
command help, and will print a deprecation warning when used.